import Mock from 'mockjs'
import homeApi from './mockData/home'
import userApi from './mockData/user'
import permissionapi from './mockData/permission'
// 拦截请求 自定义路径
Mock.mock('/home/getData', homeApi.getHomeData)

// 本地获取user数据
Mock.mock(/user\/getUser/, 'get', userApi.getUserList)
Mock.mock(/shop\/getshop/, 'get', userApi.getShopList)

// 用户增加
Mock.mock(/user\/add/, 'post', userApi.createUser)

// 用户修改
Mock.mock(/user\/edit/, 'post', userApi.updateUser)

// 用户删除
Mock.mock(/user\/delete/, 'get', userApi.deleteUser)

// 权限登录
Mock.mock(/permission\/getMenu/, 'post', permissionapi.getMenu)
